﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows8Accelerator.Core.Xaml.Html;

namespace Windows8Accelerator.Core.Xaml.Controls.RichText
{
    public class BrVisitor : ControlVisitor
    {
        public BrVisitor(SuperHtmlNode superHtmlNode, SuperHtmlNodeVisitor parentVisitor)
            : base(superHtmlNode, parentVisitor)
        {
            VisitChildren = false;
        }

        protected override void InternalVisitNode1(SuperHtmlNode htmlNode)
        {
            AddLineBreakingIfNecessary();
        }

        protected override void InternalPosVisitNode1(SuperHtmlNode htmlNode)
        {
            State.RequiresLineBreaking = true;
        }
    }
}
